[#ftl]
</head>

<body>
<div id="topmenu">
    <div id="appmenu">
        <ul>
	    	[#list ["index","metadata","occurrence","species","maps"] as men]
	    	[#if app==men]
	    		<li id="app-active">[@s.text name="app.${men}"/]</li>
	    	[#else]
	    		<li><a href="${domain}/${men}/">[@s.text name="app.${men}"/]</a></li>
	    	[/#if]
	    	[/#list]
	    		<li><a href="http://www.gbif.org/">About</a></li>
        </ul>
    </div>
    <div id="account">
      [#if (Session.user)??] 
        <ul>
        	<li>Logged in as <em>${Session.user.email}</em></li>
        	<li>[@s.text name="menu.account"/]</li>
        	[#list ["logout"] as men]
        	<li[#if currentMenu==men] id="nav-active"[/#if]><a href="${domain}/${men}">[@s.text name="menu.${men}"/]</a></li>
        	[/#list] 
        </ul>
	  [#else]
        <ul>
        	<li><a href="#">Register</a></li>
        	<li><a id="loginBtn" href="#">Login</a></li>
			<li id="tocMini"><a href="#">ToC</a></li>	
        </ul>
	  [/#if]
    
    </div>
</div>

<div id="login">
	<form id="loginf" action="${domain}/login/" method="post">
      <div>
        <input type="text" size="20" name="email" value="email" class="form-reset" id="user"/>
<br/>
        <input type="password" size="20" name="password" value="password" class="form-reset" id="pass"/>
<br/>
        <input type="submit" value="Login" id="login-submit"/>
      </div>
    </form>
</div>

<div id="main">

    <div id="header" class="box">
        <h1 id="logo"><img src="${domain}/img/gbif_small.gif"/> GBIF Data Portal</h1>
	    <img id="beta" src="${domain}/img/beta.gif"/>
    </div>

    <div id="nav" class="box">
        <ul class="menu">
	    	[#list ["index","browse"] as men]
	    	<li[#if currentMenu==men] id="nav-active"[/#if]><a href="${domain}/${men}/">[@s.text name="menu.${men}"/]</a></li>
	    	[/#list]
	    	[#if (Session.user)??]
	    	[#-- could have a menu only for logged in users here --] 
	    	[#else]
	    	<li[#if currentMenu=='account'] id="nav-active"[/#if]><a href="${domain}/register/">[@s.text name="menu.register"/]</a></li>
	    	[/#if] 
	    	[#if adminUser]
	    	<li[#if currentMenu=='admin'] id="nav-active"[/#if]><a href="${domain}/admin/">[@s.text name="menu.admin"/]</a></li>
	    	[/#if] 
        </ul>    
    </div>
    
    <div id="search">
        <form action="${domain}/search" method="get">
            <div>
                <input type="text" size="50" name="q" id="search-input" [#if !q??] class="form-reset" value='search GBIF'[#else] value='${q}'[/#if] />
                <input type="hidden" name="rkey" value='1' />
                <input type="submit" class="submitBtn" value="Search" id="search-submit" />
        	</div>
        </form>
    </div>

    
    <div id="toc">
    	<a name="toc"></a>
    	<h2>Table of Content</h2>
    	<ol></ol>
    </div>

    <div id="content" class="box">

    [@s.actionmessage /]
    
    [@s.actionerror /]
    